﻿Public Class CheckIn
    Private type As String = ""
    Public Sub New(ByVal type As String)
        Me.type = type
        InitializeComponent()
    End Sub
    Private Sub btnSubmit_Click(sender As System.Object, e As System.EventArgs) Handles btnSubmit.Click
        Dim install As Printing.PrinterSettings.StringCollection
        install = Printing.PrinterSettings.InstalledPrinters
        PrintDocument1.PrinterSettings.PrinterName = ""
        PrintDocument1.Print()
    End Sub

    Private Sub PrintDocument1_PrintPage(sender As System.Object, e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        'using (Graphics g = e.Graphics)
        ' {
        '    using (Font fnt = new Font("Arial", 16))
        '    {
        '       string caption = string.Format("Code128 barcode weight={0}", txtWeight.Text);
        '       g.DrawString(caption, fnt, System.Drawing.Brushes.Black, 300, 400);
        '       caption = string.Format("message='{0}'", txtInput.Text);
        '       g.DrawString(caption, fnt, System.Drawing.Brushes.Black, 50, 75);
        '       g.DrawImage(pictBarcode.Image, 50, 110);
        '    }
        ' }


    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles BtnReservation.Click
        Reservations.ShowDialog()
    End Sub

    Private Sub CheckIn_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Select Case type
            Case "RES"
                BtnReservation.Visible = False
                lnkAddPic.Visible = False
                PicBox.Visible = False
                dtpDropOff.Enabled = True
                ddlSource.Visible = False
                lblSource.Visible = False
                btnSubmit.Text = "Create a Reservation"
                btnSubmit.Width = 133
        End Select
    End Sub
End Class